// Since 2018, there is an easier way in Typescript, //without using keyof typeof: let layer: { [key in MyEnum]: any} // To not have to include all keys: let layer: { [key in MyEnum]?: an
let layer: Partial<Record<MyEnum, any>>;